﻿using Xejen.Communication.Http.Abstract;
using Xejen.Communication.Http.Configuration;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.Text;

namespace Xejen.Communication.Http
{
    /// <summary>
    /// 创建以HttpWebRequest为驱动的Http请求驱动器
    /// </summary>
    /// <creator>marc</creator>
    internal class HttpWebRequestInvokerCreator : IHttpInvokerCreator<HttpWebRequestInvoker>
    {
        ///// <inheritdoc/>
        //public HttpWebRequestInvoker Create(HttpConfig config, string token = default, NameValueCollection headers = default)
        //{
        //    HttpWebRequestInvoker request = new HttpWebRequestInvoker(config, token, headers);
        //    return request;
        //}

        /// <inheritdoc/>
        public HttpWebRequestInvoker Create(HttpConfig config, NameValueCollection headers )
        {
            HttpWebRequestInvoker request = new HttpWebRequestInvoker(config, headers);
            return request;
        }
    }
}
